import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import login from '@/components/login'
import register from '@/components/register'
import mima from '@/components/mima'
import left from '@/components/left'
import show_user from '@/components/show_user'
import header from '@/components/header'
import cargo from '@/components/cargo'
import show_genre from '@/components/show_genre'
import addtag from '@/components/addtag'
import showtag from '@/components/showtag'
import VueRouter from 'vue-router'
import welecome from '@/components/welecome'
import show_g from '@/components/show_g'
import xiugaimima from '@/components/xiugaimima'
import show_u from '@/components/show_u'
import addclient from '@/components/addclient'
import showclient from '@/components/showclient'
import addgoods from '@/components/addgoods'
import showgoods from '@/components/showgoods'
import yunmes from '@/components/yunmes'
import xiangqing from '@/components/xiangqing'
import pandect from '@/components/pandect'
import real_time from '@/components/real_time'
import way from '@/components/way'

Vue.use(Router)
var routes = [
  // 首页
  {
    path: '/header',
    name: 'header',
    component: header,
    redirect:'/welecome',
    children:[
      { path:'/welecome',component:welecome}, //首页
      { path: '/showtag', component: showtag },
      { path: '/addtag', component: addtag },
      { path: '/show_genre', component: show_genre },
      { path: '/cargo', component: cargo },
      { path: '/show_user', component: show_user },
      { path: '/cargo', component: cargo },
      { path: '/cargo', component: cargo },
      { path: '/cargo', component: cargo },
      { path: '/show_g', component: show_g },
      { path: '/addclient', component: addclient },
      { path: '/showclient', component: showclient },
      { path: '/addgoods', component: addgoods },
      { path: '/showgoods', component: showgoods },
      { path: '/yunmes', component: yunmes },
      { path: '/pandect', component: pandect },
      { path: '/real_time', component: real_time },
      { path: '/way', component: way },
    ]
  },
  // {
  //   path: '/pandect',
  //   name: 'pandect',
  //   component: pandect,
  // },
  {
    path: '/xiangqing',
    name: 'xiangqing',
    component: xiangqing,
  },
  {
    path: '/show_u',
    name: 'show_u',
    component: show_u,
  },
  {
    path: '/xiugaimima',
    name: 'xiugaimima',
    component: xiugaimima,
  },
  {
    path: '/welecome',
    name: 'welecome',
    component: welecome,
  },
  {
    path: '/showtag',
    name: 'showtag',
    component: showtag,
  },
  {
    path: '/addtag',
    name: 'addtag',
    component: addtag,
  },
  {
    path: '/show_genre',
    name: 'show_genre',
    component: show_genre,
  },
  {
    path: '/cargo',
    name: 'cargo',
    component: cargo,
  },
  {
    path: '/show_user',
    name: 'show_user',
    component: show_user
  },
  {
    path: '/left',
    name: 'left',
    component: left
  },
  {
    path: '/mima',
    name: 'mima',
    component: mima
  },
  {
    path: '/register',
    name: 'register',
    component: register
  },
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path:'/',
    name:'index',
    component:index
  }

]

export default new Router({
  routes:routes,
  mode:'history'   /*hash*/
})
